package com.cyan.learn.pattern.strategy;

public class StrategyContext {
    private Strategy strategy;

    public StrategyContext(Strategy strategy) {
        this.strategy = strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    /**
     * 执行对应的策略
     */
    public void show() {
        this.strategy.show();
    }
}
